/* products-mobile.css - FINAL FIXED VERSION */
@media screen and (max-width: 768px) {
    
    /* ===== PREVENT HORIZONTAL SCROLL ===== */
    html, body {
        overflow-x: hidden !important;
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 0;
        position: relative;
    }
    
    body {
        overflow-x: hidden;
        width: 100%;
        position: relative;
    }
    
    * {
        box-sizing: border-box;
        max-width: 100%;
    }
    
    .container, 
    main.container,
    .details,
    .options,
    .group,
    .tabs,
    .footer,
    .footer-container,
    .footer-content {
        max-width: 100%;
        overflow-x: hidden;
    }
    
    /* ===== HAMBURGER MENU FIX ===== */
    .hamburger-menu {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 30px;
        height: 22px;
        cursor: pointer;
        z-index: 1002;
        position: relative;
    }
    
    .hamburger-menu span {
        display: block;
        width: 100%;
        height: 3px;
        background-color: white;
        border-radius: 3px;
        transition: all 0.3s ease;
    }
    
    .hamburger-menu.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .hamburger-menu.active span:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger-menu.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    /* ===== NAVIGATION BAR ===== */
    .nav-bar {
        padding: 12px 15px;
        justify-content: space-between;
        height: auto;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        z-index: 1000;
        background: rgba(6, 72, 172, 0.95);
        backdrop-filter: blur(10px);
        box-sizing: border-box;
    }
    
    .nav-bar .logo-img {
        height: 35px;
        margin-left: 0;
        max-width: 120px;
    }
    
    .nav-content-wrapper {
        display: none;
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background: rgba(6, 72, 172, 0.98);
        flex-direction: column;
        padding: 20px 0;
        margin: 0;
        border-radius: 0 0 20px 20px;
        z-index: 999;
        box-shadow: 0 4px 10px rgba(0,0,0,0.3);
        box-sizing: border-box;
    }
    
    .nav-content-wrapper.active {
        display: flex;
    }
    
    .nav-links {
        flex-direction: column;
        width: 100%;
        gap: 5px;
    }
    
    .nav-links a,
    .nav-links .nav-link {
        width: 90%;
        margin: 3px auto;
        padding: 12px 20px;
        color: white;
        font-size: 1rem;
        border-radius: 30px;
        text-align: center;
        box-sizing: border-box;
    }
    
    .nav-links a.active,
    .nav-links .nav-link.active {
        background-color: #e2992c;
        color: white;
    }
    
    .nav-bar-extra {
        width: 90%;
        margin: 15px auto 5px;
        background-color: #e2992c;
        border-radius: 30px;
        justify-content: center;
        padding: 8px 20px;
        box-sizing: border-box;
    }
    
    /* ===== CURRENCY SELECTOR ===== */
    #currency-selector {
        top: 85px;
        right: 10px;
        z-index: 1001;
    }
    
    #currency-btn {
        padding: 0.4rem 0.7rem;
        font-size: 0.75rem;
    }
    
    #currency-panel {
        width: 160px;
        font-size: 0.8rem;
    }
    
    /* ===== PRODUCT PAGE MAIN LAYOUT ===== */
    main.container {
        display: flex;
        flex-direction: column;
        padding: 80px 10px 30px;
        margin: 0;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        box-sizing: border-box;
    }
    
    /* Product Image */
    .product-image {
        width: 100%;
        margin: 0 auto 20px;
        text-align: center;
    }
    
    .product-image img {
        max-width: 200px;
        height: auto;
        border-radius: 20px;
        box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    }
    
    /* Product Details */
    .details {
        width: 100%;
        padding: 0;
        overflow-x: hidden;
    }
    
    .details h1 {
        font-size: 1.8rem;
        margin-bottom: 10px;
        text-align: center;
        word-wrap: break-word;
    }
    
    .trust-message {
        font-size: 0.85rem;
        padding: 8px;
        margin-bottom: 15px;
        text-align: center;
        background: #f0f8ff;
        border-radius: 30px;
        word-wrap: break-word;
    }
    
    .coin-description {
        font-size: 0.95rem;
        line-height: 1.5;
        margin-bottom: 15px;
        text-align: center;
        word-wrap: break-word;
    }
    
    .details small {
        display: block;
        text-align: center;
        margin-bottom: 15px;
        font-size: 0.9rem;
        color: #666;
    }
    
    /* Package Groups */
    .options {
        display: flex;
        flex-direction: column;
        gap: 15px;
        margin-bottom: 20px;
        width: 100%;
    }
    
    .group {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        justify-content: center;
        background: #f5f5f5;
        padding: 12px 8px;
        border-radius: 15px;
        width: 100%;
        box-sizing: border-box;
    }
    
    .opt {
        flex: 0 0 calc(33.333% - 4px);
        min-width: calc(33.333% - 4px);
        max-width: calc(33.333% - 4px);
        padding: 10px 3px;
        font-size: 0.8rem;
        background: white;
        border: 1px solid #ddd;
        border-radius: 10px;
        white-space: normal;
        word-wrap: break-word;
        line-height: 1.2;
        box-shadow: 0 2px 4px rgba(0,0,0,0.05);
        box-sizing: border-box;
        text-align: center;
    }
    
    .opt.selected {
        background: #0648ac;
        color: white;
        border-color: #0648ac;
    }
    
    /* Price Display */
    .price-display {
        text-align: center;
        margin: 20px 0;
        padding: 15px;
        background: #f9f9f9;
        border-radius: 50px;
        font-size: 1.3rem;
        width: 100%;
        box-sizing: border-box;
        word-wrap: break-word;
    }
    
    #selected {
        font-weight: 600;
        color: #0648ac;
    }
    
    .equal {
        margin: 0 10px;
        color: #999;
    }
    
    #priceAmount {
        font-weight: 700;
        color: #28a745;
        font-size: 1.5rem;
    }
    
    /* Action Buttons */
    .actions {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        justify-content: center;
        margin-bottom: 20px;
        width: 100%;
    }
    
    .qty {
        width: 60px;
        padding: 10px;
        text-align: center;
        border: 1px solid #ddd;
        border-radius: 10px;
        font-size: 1rem;
        box-sizing: border-box;
    }
    
    .add-btn {
        flex: 1;
        min-width: 120px;
        padding: 12px 15px;
        background: #0648ac;
        color: white;
        border: none;
        border-radius: 10px;
        font-weight: 600;
        font-size: 1rem;
        box-sizing: border-box;
    }
    
    .clear-btn {
        padding: 12px 15px;
        background: #dc3545;
        color: white;
        border: none;
        border-radius: 10px;
        font-weight: 600;
        font-size: 1rem;
        box-sizing: border-box;
    }
    
    .view-cart-btn {
        padding: 12px 15px;
        background: #28a745;
        color: white;
        border: none;
        border-radius: 10px;
        font-weight: 600;
        font-size: 1rem;
        width: 100%;
        box-sizing: border-box;
    }
    
    /* Success Message */
    .success-message {
        margin: 15px 0;
        padding: 12px;
        font-size: 0.9rem;
        text-align: center;
        background: #d4edda;
        color: #155724;
        border-radius: 10px;
        border-left: 4px solid #28a745;
        width: 100%;
        box-sizing: border-box;
        word-wrap: break-word;
        display: none;
    }
    
    /* Meta Info */
    .meta-line {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        justify-content: center;
        margin: 20px 0;
        padding: 15px;
        background: #f5f5f5;
        border-radius: 10px;
        font-size: 0.85rem;
        width: 100%;
        box-sizing: border-box;
    }
    
    /* ===== CART PANEL - HIDDEN UNTIL CLICKED ===== */
    .cart-panel,
    #cart-panel {
        display: none !important; /* Force hidden by default */
        position: fixed;
        width: 90%;
        max-width: 350px;
        right: 5%;
        top: 80px;
        border-radius: 15px;
        background: white;
        box-shadow: 0 10px 30px rgba(0,0,0,0.3);
        z-index: 2000;
        box-sizing: border-box;
    }
    
    .cart-panel.open,
    #cart-panel.open {
        display: block !important;
    }
    
    .cart-overlay,
    #cart-overlay {
        display: none !important;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 1999;
    }
    
    .cart-overlay.open,
    #cart-overlay.open {
        display: block !important;
    }
    
    /* Cart Panel Content */
    .cart-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 15px;
        border-bottom: 1px solid #eee;
    }
    
    .cart-header h3 {
        margin: 0;
        font-size: 1.2rem;
        color: #333;
    }
    
    .close-cart {
        background: none;
        border: none;
        font-size: 1.8rem;
        cursor: pointer;
        color: #999;
        padding: 0 5px;
    }
    
    .cart-items-list {
        max-height: 300px;
        overflow-y: auto;
        padding: 10px;
    }
    
    .cart-totals-section {
        padding: 15px;
        border-top: 1px solid #eee;
        display: none;
    }
    
    .cart-totals-section.show {
        display: block;
    }
    
    .cart-subtotal {
        display: flex;
        justify-content: space-between;
        font-weight: bold;
        margin-bottom: 15px;
    }
    
    .cart-btn {
        display: block;
        width: 100%;
        padding: 12px;
        background: #28a745;
        color: white;
        text-align: center;
        text-decoration: none;
        border-radius: 8px;
        font-weight: 600;
    }
    
    .help-section {
        padding: 15px;
        text-align: center;
        border-top: 1px solid #eee;
    }
    
    .help-section a {
        color: #0648ac;
        text-decoration: none;
    }
    
    /* Tabs Section */
    .tabs {
        padding: 20px 10px;
        width: 100%;
        overflow-x: hidden;
        box-sizing: border-box;
    }
    
    .tab-buttons {
        display: flex;
        gap: 10px;
        margin-bottom: 20px;
    }
    
    .tab-btn {
        flex: 1;
        padding: 12px;
        font-size: 0.9rem;
        background: #f5f5f5;
        border: none;
        border-radius: 8px;
        cursor: pointer;
    }
    
    .tab-btn.active {
        background: #0648ac;
        color: white;
    }
    
    /* Related Products */
    .related-grid {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }
    
    .related-item {
        display: flex;
        align-items: center;
        gap: 15px;
        padding: 10px;
        background: #f9f9f9;
        border-radius: 15px;
    }
    
    .related-thumb {
        width: 80px;
        height: 80px;
        flex-shrink: 0;
    }
    
    .related-thumb img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 10px;
    }
    
    .related-name {
        font-size: 1rem;
        font-weight: 600;
        margin-bottom: 5px;
    }
    
    .related-price {
        font-size: 0.9rem;
        color: #28a745;
        font-weight: 600;
    }
    
    /* Reviews Form */
    .review-form {
        padding: 15px;
    }
    
    .review-form input,
    .review-form textarea {
        width: 100%;
        padding: 12px;
        margin-bottom: 15px;
        border-radius: 10px;
        font-size: 0.95rem;
        border: 1px solid #ddd;
        box-sizing: border-box;
    }
    
    .stars {
        justify-content: center;
        margin: 15px 0;
    }
    
    .stars span {
        font-size: 2rem;
        cursor: pointer;
    }
    
    .submit-btn {
        width: 100%;
        padding: 15px;
        font-size: 1rem;
        background: #0648ac;
        color: white;
        border: none;
        border-radius: 8px;
        cursor: pointer;
    }
    
    /* WhatsApp Button */
    .whatsapp-float {
        bottom: 15px;
        right: 15px;
        z-index: 1000;
    }
    
    .whatsapp-float .wa-icon {
        width: 45px;
        height: 45px;
    }
    
    .whatsapp-float .wa-text {
        font-size: 0.8rem;
        padding: 8px 12px;
    }
    
    /* Footer */
    .footer {
        overflow-x: hidden;
        width: 100%;
        box-sizing: border-box;
    }
    
    .footer-container {
        width: 100%;
        padding: 0 15px;
        box-sizing: border-box;
    }
    
    .footer-content {
        width: 100%;
        box-sizing: border-box;
    }
}

/* Extra small devices */
@media screen and (max-width: 480px) {
    .opt {
        flex: 0 0 calc(50% - 4px);
        min-width: calc(50% - 4px);
        max-width: calc(50% - 4px);
    }
    
    .product-image img {
        max-width: 150px;
    }
    
    .details h1 {
        font-size: 1.5rem;
    }
    
    .price-display {
        font-size: 1.1rem;
    }
    
    #priceAmount {
        font-size: 1.3rem;
    }
    
    .actions {
        flex-direction: column;
    }
    
    .qty {
        width: 100%;
    }
    
    .add-btn,
    .clear-btn,
    .view-cart-btn {
        width: 100%;
    }
    
    .cart-panel {
        width: 95%;
        right: 2.5%;
    }
}

/* Small phones */
@media screen and (max-width: 360px) {
    .opt {
        font-size: 0.7rem;
        padding: 8px 3px;
    }
    
    .product-image img {
        max-width: 120px;
    }
}